#ifndef ASCIIFREQANALYSIS_H
#define ASCIIFREQANALYSIS_H

#include <QWidget>
#include <QHash>
#include <QByteArray>
#include <QThread>

namespace Ui {
    class AsciiFreqAnalysis;
}

class AsciiFreqAnalysis : public QWidget
{
    Q_OBJECT

public:
    explicit AsciiFreqAnalysis(QWidget *parent = 0);
    ~AsciiFreqAnalysis();

public slots:
    void onAnalyzeDone(QString);

private slots:
    void on_load_clicked();

    void on_analyze_clicked();

    void on_cEscape_clicked();

    void on_URLEscape_clicked();

    void on_hex_clicked();

    void on_base64_clicked();

    void on_binaryMode_clicked(bool checked);

    void on_loadFreqs_clicked();

    void on_clear_clicked();

private:
    Ui::AsciiFreqAnalysis *ui;
    QHash<QByteArray, int> frequencies;
};

#endif // ASCIIFREQANALYSIS_H
